package com.itheima.Ws;

import java.io.*;
import java.net.Socket;

public class C {
    public static void main(String[] args) throws IOException {
        Socket socket = new Socket("127.0.0.1", 10000);
        BufferedInputStream bis = new BufferedInputStream(new FileInputStream("E:\\img1\\200.png"));
        BufferedOutputStream bos = new BufferedOutputStream(socket.getOutputStream());
        int lne;
        byte[]bay=new byte[1024];
        while ((lne=bis.read(bay))!=-1){
            bos.write(bay,0,lne);
        }
        bos.close();
        bis.close();
    }
}
